package com.scs.application.modules.wm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "安全库存表")
@TableName("wm_stock_safety")
public class StockSafety extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "仓库ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String warehouseId;

    @EntityFieldAnnotation(
            text = "仓库名称",
            length = "50",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String warehouseName;

    @EntityFieldAnnotation(
            text = "物料ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "物料名称",
            length = "100",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrName;

    @EntityFieldAnnotation(
            text = "物料品规",
            length = "100",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrSpec;

    @EntityFieldAnnotation(
            text = "单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String skuUnit;

    @EntityFieldAnnotation(
            text = "安全库存",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuQtySafety;

    @EntityFieldAnnotation(
            text = "最佳库存",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuQtyPerfect;

    @EntityFieldAnnotation(
            text = "日消耗量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuQtyDaily;

    @EntityFieldAnnotation(
            text = "要求单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String requiredUnit;

    @EntityFieldAnnotation(
            text = "要求单位比率",
            length = "10",
            not_null = false,
            default_value = "1",
            comment = ""
    )
    private Double requiredRate;

    @EntityFieldAnnotation(
            text = "是否自动请领",
            length = "",
            not_null = false,
            default_value = "1",
            comment = ""
    )
    private Boolean flagAutoJob;

    @EntityFieldAnnotation(
            text = "执行周期",
            length = "10",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private String jobPeriod;

    @EntityFieldAnnotation(
            text = "耗材型号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "耗材型号"
    )
    private String matrModel;

    @EntityFieldAnnotation(
            text = "送货周期",
            length = "10",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private String deliverPeriod;

    @TableField(exist = false)
    private String mfgName;

    @TableField(exist = false)
    private double skuPrice;

    @TableField(exist = false)
    private String supplierName;

    @TableField(exist = false)
    private String hrpCode;

    @TableField(exist = false)
    private Integer flagOmoc;

    @TableField(exist = false)
    private Integer flagCenterPurchase;



    // 实时库存单品数量
    @TableField(exist = false)
    private double skuQtyDb = 0;

    // 在途单品数量
    @TableField(exist = false)
    private double skuQtyWay = 0;

    // 需要补充的单品数量
    @TableField(exist = false)
    private double skuQtyNeed = 0;

    // 需求类型 采购:PURCHASE,配送:DIST
    @TableField(exist = false)
    private String needType;
}
